import React from 'react';
import ChildComponent2 from './components/ChildComponent2';

const ParentComponent = () => {
  const handleClick = () => {
    alert('按钮被点击了');
  };

  return (
    <div>
      <h1>父组件</h1>
      <ChildComponent2 handleClick={handleClick} />
    </div>
  );
};

export default ParentComponent;
